package Messages;
import java.io.Serializable;

/**
 * This is our Message system we use to send messages between the client to the server.
 * all messages inherits from this class. every message has a unique purpose and it gets it 
 * type from the enum to the server or the client can identify what the message meaning is.
 * @author andrey
 * @author Igor
 *
 */
public class Message implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private MessageType messageType;
// -----------------------------------------------------test------------------------------------------
	public enum MessageType 
	    {
	    MESSAGE_LOGIN,
	    MESSAGE_LOGIN_REPLY,	  	   
	    MESSAGE_LOGOUT,
	    MESSAGE_ADD_NEW_EMPLOYEE,


	    MESSAGE_SHOW_ALL_EMPLOYEES,
	    MESSAGE_SHOW_ALL_EMPLOYEES_REPLY,

	    MESSAGE_SAVING_REPLY,
	    MESSAGE_ADD_NEW_SUPPLIER,
	    MESSAGE_SHOW_ID_SUPPLIER_MAX,
	    MESSAGE_SHOW_ID_SUPPLIER_MAX_REPLY,
	    MESSAGE_SHOW_ID_EMPLOYEE_MAX,
	    MESSAGE_SHOW_ID_EMPLOYEE_MAX_REPLY,
	    MESSAGE_SHOW_ALL_SUPPLIERS,
	     MESSAGE_DELETE_SUPPLIER, 
	     MESSAGE_SHOW_ALL_ITEMS,
	     MESSAGE_SHOW_ALL_ITEMS_REPLY,
	    
	     
	     MESSAGE_CHECK_USERNAME,
	     MESSAGE_CHECK_USERNAME_REPLY,

	   
	     MESSAGE_GET_MENU_TABLE_DETAILS, 
	     MESSAGE_GET_MENU_TABLE_DETAILS_REPLY,
	     MESSAGE_GET_RECIPES_MENU_THIS, 
	     MESSAGE_GET_RECIPES_MENU_THIS_REPLY,
	     

	    
	     MESSAGE_GET_USER_BY_ID,
	     MESSAGE_GET_USER_BY_ID_REPLY,
	     MESSAGE_UPDATE_EMPLOYEE,
	     MESSAGE_GET_ALL_SUPPLIER_ITEMS,
	     MESSAGE_GET_ALL_ITEMS,
	     MESSAGE_GET_SUPPLIER_ITEMS_REPLY,
	     MESSAGE_GET_ALL_ITEMS_REPLY, 
	     MESSAGE_GET_ITEMS_BY_CATEGORY,

	     MESSAGE_GET_ITEMS_BY_CATEGORY_REPLY, 
	     MESSAGE_GET_ALL_RECIPES,
	     MESSAGE_GET_ALL_RECIPES_REPLY,
	     MESSAGE_SHOW_ID_MENU_MAX,
	     MESSAGE_SHOW_ID_MENU_MAX_REPLY,
	     MESSAGE_ADD_NEW_BUSINESS_MENU,
	     MESSAGE_SHOW_ALL_MENUS, 
	     MESSAGE_SHOW_ALL_MENUS_REPLY,
	     MESSAGE_GET_ALL_MENU_RECIPES,
	     MESSAGE_GET_RECIPES_THAT_NOT_IN_THIS_MENU,
	     MESSAGE_GET_RECIPES_THAT_NOT_IN_THIS_MENU_REPLY,
	     MESSAGE_UPDATE_CURRENT_MENU,

	     

	     MESSAGE_ADD_ITEM_TO_SUPPLIER, 
	     MESSAGE_DELETE_BUSINESS_MENU, 
	     MESSAGE_SHOW_ALL_RECIPES_THAT_CAN_BUY, 
	     MESSAGE_SHOW_ALL_RECIPES_THAT_CAN_BUY_REPLY,

	    
	     MESSAGE_REMOVE_ITEM_FROM_SUPPLIER, 
	     MESSAGE_UPDATE_ITEMS_OF_SUPPLIER, 
	     MESSAGE_GET_SUPPLIER_BY_ID, 
	     MESSAGE_GET_SUPPLIER_BY_ID_REPLY, 

	     MESSAGE_UPDATE_SUPPLIER, 
	     MESSAGE_SHOW_ID_RECIPE_MAX,
	     MESSAGE_SHOW_ID_RECIPE_MAX_REPLY,
	     MESSAGE_GET_ALL_ITEMS_FOR_NEW_RECIPE,
	     MESSAGE_GET_ALL_ITEMS_FOR_NEW_RECIPE_REPLY,
	     MESSAGE_GET_ITEMS_BY_CATEGORY_FOR_NEW_RECIPE,
	     MESSAGE_GET_ITEMS_BY_CATEGORY_FOR_NEW_RECIPE_REPLY, 
	     MESSAGE_GET_PRICE_ITEM_FROM_OUR_SUPPLIER,
	     MESSAGE_GET_PRICE_ITEM_FROM_OUR_SUPPLIER_REPLY, 
	     MESSAGE_ADD_NEW_RECIPE_TO_DATA_BASE,
	     MESSAGE_ADD_WORKING_HOURS,
	     MESSAGE_ADD_WORKING_HOURS_REPLY, 
	     MESSAGE_GET_WORK_HOURS_BY_ID_EMPLOYEE, 
	     MESSAGE_GET_WORK_HOURS_BY_ID_EMPLOYEE_REPLY,
	     MESSAGE_CHECK_EXISTS_EMPLOYEE_FOR_CLOCK_IN_OUT,
	     MESSAGE_CHECK_EXISTS_EMPLOYEE_FOR_CLOCK_IN_OUT_REPLY,
	     MESSAGE_RETURN_DECISION_ABOUT_BUTTON_ENTER_OR_EXIT,
	     MESSAGE_RETURN_DECISION_ABOUT_BUTTON_ENTER_OR_EXIT_REPLY,
	     
	     

	     
	     MESSAGE_DELETE_EMPLOYEE, 
	     MESSAGE_GET_ALL_TELEPHONE_ORDERS_FOR_DATE, 
	     MESSAGE_GET_ALL_TELEPHONE_ORDERS_FOR_DATE_REPLY, 
	     MESSAGE_ADD_NEW_TELEPHONE_ORDER, 
	     MESSAGE_GET_ID_FOR_NEW_TELEPHONE_ORDER, 
	     MESSAGE_GET_ID_FOR_NEW_TELEPHONE_REPLY, 
	     MESSAGE_UPDATE_TABLE_OF_TELEPHONE_ORDER, 
	     MESSAGE_UPDATE_TELEPHONE_ORDER, 
	     MESSAGE_CHECK_SCHEDULE_IF_EXISTS,
	     MESSAGE_CHECK_SCHEDULE_IF_EXISTS_REPLY,
	     MESSAGE_SAVE_NEW_SCHEDULE, 
	     MESSAGE_GET_ALL_SCHEDULES,
	     MESSAGE_GET_ALL_SCHEDULES_REPLY,
	     MESSAGE_UPDATE_SCHEDULE,
	     MESSAGE_GET_STATUS_OF_ALL_TABLES,
	     MESSAGE_ADD_OR_UPDATE_WORKING_HOURS_FROM_DOH, 
	     MESSAGE_GET_STATUS_OF_ALL_TABLES_REPLY, 
	     MESSAGE_GET_ALL_MENUES_REPLY, 
	     MESSAGE_GET_ALL_MENUES,
	     MESSAGE_SHOW_ID_STANDARD_MENU_MAX,
	     MESSAGE_SHOW_ID_STANDARD_MENU_MAX_REPLY, 
	     MESSAGE_SHOW_ALL_STANDARDS_MENUS,
	     MESSAGE_SHOW_ALL_STANDARDS_MENUS_REPLY,
	     MESSAGE_GET_COST_RECIPE_BY_NAME_REPLY,
	     MESSAGE_GET_COST_RECIPE_BY_NAME,
	     MESSAGE_GET_REPORT_WAITERS_BY_DATE, 
	     MESSAGE_GET_REPORT_WAITERS_BY_DATE_REPLY,
	     MESSAGE_UPDATE_CURRENT_RECIPE,
	      MESSAGE_GET_ITEMS_OF_EXISTING_RECIPE_REPLY,
	      MESSAGE_GET_ITEMS_OF_EXISTING_RECIPE,
	      MESSAGE_GET_ITEMS_THAT_NOT_IN_THIS_RECIPE,
	      MESSAGE_GET_ITEMS_THAT_NOT_IN_THIS_RECIPE_REPLY, 
	      MESSAGE_SAVE_TABLE_ORDER,
	      MESSAGE_GET_REPORT_WAITER_THIS_BY_DATE, 
	      MESSAGE_GET_REPORT_WAITER_THIS_BY_DATE_REPLY, 
	      MESSAGE_CLOSE_TABLE,
	      MESSAGE_GET_REPORT_WORK_HOURS_OF_WAITER,
	      MESSAGE_GET_REPORT_WORK_HOURS_OF_WAITER_REPLY,
	      MESSAGE_ADD_NEW_INVENTORY_ITEM,
	      MESSAGE_ADD_NEW_INVENTORY_ITEM_REPLY,
	      MESSAGE_ADD_NEW_ORDER,
	      MESSAGE_ADD_NEW_ORDER_REPLY, 
	      MESSAGE_GET_ITEM_BY_ID, 
	      MESSAGE_GET_ITEM_BY_ID_REPLY,
	      MESSAGE_GET_ITEMS_CATEGORIES,
	      MESSAGE_GET_ITEMS_CATEGORIES_REPLY,
	      MESSAGE_GET_SUPPLIERS_FOR_ITEM, 
	      MESSAGE_GET_SUPPLIERS_FOR_ITEM_REPLY, 
	      MESSAGE_SHOW_ALL_INVENTORY,
	      MESSAGE_SHOW_ALL_INVENTORY_REPLY, 
	      MESSAGE_SHOW_ID_INVENTORY_ITEM,
	      MESSAGE_SHOW_MAX_ID_INVENTORY_ITEM_REPLY, 
	      MESSAGE_DELETE_RECIPE,
	      MESSAGE_GET_ORDERS,
	      MESSAGE_GET_ORDERS_REPLY,
	      MessageGetItemsForOrder,
	      MessageGetItemsForOrderReply,
	      MESSAGE_CHECK_EXISTS_ITEM,
	      MESSAGE_CHECK_EXISTS_ITEM_REPLY,
	      MESSAGE_ADD_COMMENT_TO_EMP_WORK_HRS,
	      MESSAGE_GET_WORKING_HOURS,
	      MESSAGE_GET_ALL_FIRES,
	      MESSAGE_GET_ALL_FIRES_REPLY, 
	      MESSAGE_GET_FIRES_BY_ORDERID, 
	      MESSAGE_GET_FIRES_BY_ORDERID_REPLY,
	      MESSAGE_SAVE_FIRES, 
	      MESSAGE_GET_FIRED_RECIPES, 
	      MESSAGE_GET_FIRED_RECIPES_REPLY,
	      MESSAGE_ADD_NEW_STANDARD_MENU,
	      MESSAGE_GET_RECIPES_TO_LEFT_LIST_FOR_ADD_BUSSMENU,
	      MESSAGE_GET_RECIPES_TO_LEFT_LIST_FOR_ADD_BUSSMENU_REPLY,
	      MESSAGE_GET_RECIPES_TO_LEFT_LIST_FOR_UPD_BUSSMENU,
	      MESSAGE_GET_RECIPES_TO_LEFT_LIST_FOR_UPD_BUSSMENU_REPLY,
	      MESSAGE_GET_RECIPES_TO_LEFT_LIST_FOR_UPD_STANDMENU,
	      MESSAGE_GET_RECIPES_TO_LEFT_LIST_FOR_UPD_STANDMENU_REPLY,
	      MESSAGE_GET_RECIPES_TO_RIGHT_LIST_FOR_UPD_BUSSMENU,
	      MESSAGE_GET_RECIPES_TO_RIGHT_LIST_FOR_UPD_BUSSMENU_REPLY,
	      MESSAGE_GET_RECIPES_TO_RIGHT_LIST_FOR_UPD_STANDMENU,
	      MESSAGE_GET_RECIPES_TO_RIGHT_LIST_FOR_UPD_STANDMENU_REPLY,
	      MESSAGE_UPDATE_BUSINESS_MENU,
	      MESSAGE_UPDATE_STANDARD_MENU, 
	      MESSAGE_SUBMIT_FIRE,
	      MESSAGE_UPDATE_WORKING_HOURS_REPLY,
	      MESSAGE_REMOVE_COMMENT_FROM_EMP_WORK_HRS, 
	      MESSAGE_ADD_NEW_PAYMENT_OF_TABLE,
	      MESSAGE_GET_PAYMENT_DETAILS_BY_ORDERID,
	      MESSAGE_GET_PAYMENT_DETAILS_BY_ORDERID_REPLY,
	      MESSAGE_CHECK_BALANCE_PRESENT_CARD,
	      MESSAGE_CHECK_BALANCE_PRESENT_CARD_REPLY,
	      MESSAGE_ADD_NEW_DISCOUNT_TO_TABLE,
	      MESSAGE_DELETE_DISCOUNT_FROM_TABLE,
	      MESSAGE_GET_DETAILS_DISCOUNT_OF_TABLE,
	      MESSAGE_GET_DETAILS_DISCOUNT_OF_TABLE_REPLY,
	      MESSAGE_CHECK_EXISTS_PRESENT_CARD,
	      MESSAGE_CHECK_EXISTS_PRESENT_CARD_REPLY,
	      MESSAGE_SHOW_ALL_TABLES_OF_THIS_SHIFT,
	      MESSAGE_SHOW_ALL_TABLES_OF_THIS_SHIFT_REPLY,
	      MESSAGE_SAVE_COMMENTS_FOR_A_TABLE
	      

	     

	    }
	
	/**
	 * 
	 * @param type Message type
	 */
	public Message(MessageType type){
		messageType = type;	
	}

	
	/**
	 * 
	 * @return Message type
	 */
	public MessageType getMessageType(){
		return messageType;	
	}
	
	
}

